//: reusing/Orc.java
// The protected keyword.
package chapter7;
import static utility.Print.*;

import java.util.ArrayList;

import simple.*;

/**
 * Exercise 16: (2) Create a class called Amphibian. From this, inherit a class
 * called Frog. Put appropriate methods in the base class. In main( ), create a
 * Frog and upcast it to Amphibian and demonstrate that all the methods still
 * work.
 * 
 * @author rDiaconescu
 * 
 */

class Ampfibian {
	
	public void walk() {
		print("Amphibian is walking");
	}
	
	public void swimm() {
		print("Amphibian is swimming");
	}
}

class Frog extends Ampfibian {
	private String name;
	public void walk() {
		print("Frog is walking");
	}
	
	public void swimm() {
		print("Frog is swimming");
	}
}

public class Exercise16 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Ampfibian a;
		
		Frog f = new Frog();
		
		a = f;
	
		a.walk();
		a.swimm();
		
	}
}